#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <aclconio.h>
#include <define.h>
#include <transact.h>
#include <tran.h>
#include <gds.h>
#include <sizes.h>
#include <\SOFTPAY\Ver30\source\include\sizes.h>
#include <\SOFTPAY\Ver30\HostSrc\citisrc\citiids.h>
#include <\SOFTPAY\Ver30\HostSrc\cpacsrc\cpacids.h>
#include <confio.h>

#include <\SOFTPAY\Ver30\source\include\MST.h>

const char*MSTName = "MST.dat";

static MST_REC srMSTRec;

static int recordNum;
int	inLoadMSTRec (int inRecNumber)
{
	int inRet;

	inRet = inLoadConfRec(MST_FILENAME, SIZE_MST_REC, inRecNumber, (char *) &srMSTRec);

	recordNum = inRecNumber;
	return inRet;
}

void *pvdGetMSTRec(void)
{
	return &srMSTRec;

}

int	inSaveMSTRec (int inRecNumber)
{
	int inRet;

	inRet = inSaveConfRec(MST_FILENAME, SIZE_MST_REC, inRecNumber, (char *) &srMSTRec);

	return inRet;
}

int	inGetMSTRecNumber (void)
{
	return recordNum;
}

int	inUpdateMSTRec (void)
{
	int inRet;

	inRet = inSaveConfRec(MST_FILENAME, SIZE_MST_REC, recordNum, (char *) &srMSTRec);

	return inRet;
}

void	vdResetMSTRec (void)
{
	memset((void*)&srMSTRec, 0, REC_SIZEOF(srMSTRec));
}

short shGetMaxBanners(void)
{
	return srMSTRec.shMaxBanners;
}

void vdSetMaxBanners(short shMaxBanners)
{
	srMSTRec.shMaxBanners = shMaxBanners;
}

VS_BOOL fGetVCSession(void)
{
	return srMSTRec.fVCSession;
}

void vdSetVCSession(VS_BOOL fVCSession)
{
	srMSTRec.fVCSession = fVCSession;
}

